import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// 引入icon
import './assets/icon/iconfont.css'

import '@/permission' // permission control

import globalComponents from '@/components/Global'
Vue.use(globalComponents)

import api from './api/install'
Vue.use(api)

Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  data: {
    // 空的实例放到根组件下，所有的子组件都能调用
    Bus: new Vue()
},
  render: h => h(App)
}).$mount('#app')
